package org.clickframes.plugins.jee6.factory;


import org.clickframes.model.Entity;
import org.clickframes.model.mvc.GeneralClass;

public class EJBCDIServiceFactory {
	public static GeneralClass createService(Entity entity) {
		GeneralClass out = new GeneralClass(entity.getName() + "Service");
		out.setClassAnnotation("@Stateless\n @Named");
		out.getImports().add("javax.ejb.Stateless");
		out.getImports().add("javax.inject.Named");
//		out.getImports().add("javax.enterprise.context.RequestScoped");
//		out.getImports().add("javax.enterprise.inject.Any");
//		out.getImports().add("javax.enterprise.inject.Produces");

		
		
//		Set<String> entities = new HashSet<String>();

//		//generate getters first and then setters in order fields were declared.
//
//		for(Field field : out.getFields()){
//			out.getMethods().add(SimpleMethod.createGetter(field));
//		}
//
//		for(Field field : out.getFields()){
//			out.getMethods().add(SimpleMethod.createSetter(field));
//		}
		return out;
	}
}
